package com.ruoyi.know.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 积分记录对象 point_records
 *
 * @author ruoyi
 * @date 2025-02-14
 */
public class PointRecords extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键 */
    private Long id;

    /** 用户 */
    private Long userId;

    //用户名称
    @Excel(name = "用户")
    private String userName;

    /** 行为 */
    @Excel(name = "行为")
    private String actionType;

    /** 得分 */
    @Excel(name = "得分")
    private int pointsEarned;

    /** 时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date createdAt;

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }
    public void setUserId(Long userId)
    {
        this.userId = userId;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public Long getUserId()
    {
        return userId;
    }
    public void setActionType(String actionType)
    {
        this.actionType = actionType;
    }

    public String getActionType()
    {
        return actionType;
    }
    public void setPointsEarned(int pointsEarned)
    {
        this.pointsEarned = pointsEarned;
    }

    public int getPointsEarned()
    {
        return pointsEarned;
    }
    public void setCreatedAt(Date createdAt)
    {
        this.createdAt = createdAt;
    }

    public Date getCreatedAt()
    {
        return createdAt;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("userId", getUserId())
            .append("actionType", getActionType())
            .append("pointsEarned", getPointsEarned())
            .append("createdAt", getCreatedAt())
            .toString();
    }
}
